#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQuickWindow>
#include "serialportpro.h"

int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);
     system("cp ../Brazil_df/*.qml ./ -f");
    QQmlApplicationEngine engine;
    engine.load(QUrl(QStringLiteral("main.qml")));
    QQuickWindow *window = qobject_cast<QQuickWindow *>(engine.rootObjects().first());
    //window->showFullScreen();

    Serialportpro *my  = new Serialportpro();
    QObject::connect(my,SIGNAL(state_s(QVariant)),(QObject*)window,SLOT(state_c(QVariant)));
    QObject::connect(my,SIGNAL(flr_s(QVariant)),(QObject*)window,SLOT(flr_c(QVariant)));
    QObject::connect(my,SIGNAL(dir_s(QVariant)),(QObject*)window,SLOT(dir_c(QVariant)));
    QObject::connect(my,SIGNAL(regflr_s(QVariant)),(QObject*)window,SLOT(regflr_c(QVariant)));
    QObject::connect(my,SIGNAL(unregflr_s(QVariant)),(QObject*)window,SLOT(unregflr_c(QVariant)));

    return app.exec();
}
